import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        int mid = num;
        while(mid != 0){
            System.out.print(mid % 10 +" ");
            mid /= 10;
        }
        scam.close();
    }
}
